<?php

class AbstractModel extends \think\Model{

    function __construct($data = [])
    {
        parent::__construct($data);

        \think\Config::set('database',$this->connection);
    }

    protected $connection = [
        'type' => 'mysql',
        'hostname' => 'rm-uf66r00j217i4egckzo.mysql.rds.aliyuncs.com',
        'hostport' => '3306',
        'database' => 'salesman',
        'username' => 'root2',
        'password' => 'WWWlife8',
        'charset' => 'utf8',
        'prefix' => 'sh_',
        'datetime_format' => 'Y-m-d H:i:s',
        'debug' => true
    ];

}